# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=perl-freezethaw
_pkgreal=FreezeThaw
pkgver=0.5001
pkgrel=2
pkgdesc="Convert arbitrary objects to/from strings"
url="https://metacpan.org/release/FreezeThaw/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-carp perl-exporter"
subpackages="$pkgname-doc"
source="https://www.cpan.org/authors/id/I/IL/ILYAZ/modules/FreezeThaw-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="c655099e361541d214961d072fcd9afdbe2c491a41de4a20bc29db8e36570806dc13197001e5a412b5523225442578ed42abe1e644a7f59b9e0498f15b90a45c  FreezeThaw-0.5001.tar.gz"
